package terminal_enum

// 终端-终端参数设置状态
type terminalSetStatus int

var TerminalSetStatus terminalSetStatus

// 执行成功
func (c *terminalSetStatus) Success() int {
	return 1
}

// 执行失败
func (c *terminalSetStatus) Failure() int {
	return 2
}

func (c *terminalSetStatus) ToText(value int) string {
	switch value {

	case 1:
		return "执行成功"

	case 2:
		return "执行失败"

	}
	return ""
}

func (c *terminalSetStatus) ToValue(text string) int {
	switch text {

	case "执行成功":
		return 1

	case "执行失败":
		return 2

	}
	return 0
}
